In the past, a technology for collecting the number of times of execution of each of a plurality of execution paths of a program was used. For instance, according to the technology described in the Non-Patent Document 1, a compiler can insert a counter at an appropriate position in order to count the number of times of execution of the plurality of execution paths.
Non-Patent Document 1
“Efficient Path Profiling,” Proceedings of 29th International Conference on Microarchitecture (MICRO-29), Ball, T and Larus, J. R., pp. 46 to 57, December 1996